﻿// --------------------------------------------------------------------------------------------------------------------
// <copyright file="OptionParameterAttribute.cs" company="Matthias Friedrich">
//   Copyright © Matthias Friedrich 2013
// </copyright>
// --------------------------------------------------------------------------------------------------------------------

namespace CommandlineHandling
{
    using System;

    [AttributeUsage(AttributeTargets.Property | AttributeTargets.Field, Inherited = true, AllowMultiple = true)]
    public class OptionParameterAttribute : Attribute
    {
        public OptionParameterAttribute(string parameterName)
        {
            ExceptionExtensions.ThrowArgumentNullException(parameterName, () => parameterName);
            this.ParameterName = parameterName;
        }

        public string ParameterName { get; private set; }

        public bool Required { get; set; }
    }
}